/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entityprojet;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Ron
 */
@Entity
@Table(name = "F_LIVRAISON")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FLivraison.findAll", query = "SELECT f FROM FLivraison f"),
    @NamedQuery(name = "FLivraison.findByLINo", query = "SELECT f FROM FLivraison f WHERE f.lINo = :lINo"),
    @NamedQuery(name = "FLivraison.findByLIIntitule", query = "SELECT f FROM FLivraison f WHERE f.lIIntitule = :lIIntitule"),
    @NamedQuery(name = "FLivraison.findByLIAdresse", query = "SELECT f FROM FLivraison f WHERE f.lIAdresse = :lIAdresse"),
    @NamedQuery(name = "FLivraison.findByLIComplement", query = "SELECT f FROM FLivraison f WHERE f.lIComplement = :lIComplement"),
    @NamedQuery(name = "FLivraison.findByLICodePostal", query = "SELECT f FROM FLivraison f WHERE f.lICodePostal = :lICodePostal"),
    @NamedQuery(name = "FLivraison.findByLIVille", query = "SELECT f FROM FLivraison f WHERE f.lIVille = :lIVille"),
    @NamedQuery(name = "FLivraison.findByLICodeRegion", query = "SELECT f FROM FLivraison f WHERE f.lICodeRegion = :lICodeRegion"),
    @NamedQuery(name = "FLivraison.findByLIPays", query = "SELECT f FROM FLivraison f WHERE f.lIPays = :lIPays"),
    @NamedQuery(name = "FLivraison.findByLIContact", query = "SELECT f FROM FLivraison f WHERE f.lIContact = :lIContact"),
    @NamedQuery(name = "FLivraison.findByNExpedition", query = "SELECT f FROM FLivraison f WHERE f.nExpedition = :nExpedition"),
    @NamedQuery(name = "FLivraison.findByNCondition", query = "SELECT f FROM FLivraison f WHERE f.nCondition = :nCondition"),
    @NamedQuery(name = "FLivraison.findByLIPrincipal", query = "SELECT f FROM FLivraison f WHERE f.lIPrincipal = :lIPrincipal"),
    @NamedQuery(name = "FLivraison.findByLITelephone", query = "SELECT f FROM FLivraison f WHERE f.lITelephone = :lITelephone"),
    @NamedQuery(name = "FLivraison.findByLITelecopie", query = "SELECT f FROM FLivraison f WHERE f.lITelecopie = :lITelecopie"),
    @NamedQuery(name = "FLivraison.findByLIEMail", query = "SELECT f FROM FLivraison f WHERE f.lIEMail = :lIEMail"),
    @NamedQuery(name = "FLivraison.findByCbProt", query = "SELECT f FROM FLivraison f WHERE f.cbProt = :cbProt"),
    @NamedQuery(name = "FLivraison.findByCbMarq", query = "SELECT f FROM FLivraison f WHERE f.cbMarq = :cbMarq"),
    @NamedQuery(name = "FLivraison.findByCbCreateur", query = "SELECT f FROM FLivraison f WHERE f.cbCreateur = :cbCreateur"),
    @NamedQuery(name = "FLivraison.findByCbModification", query = "SELECT f FROM FLivraison f WHERE f.cbModification = :cbModification"),
    @NamedQuery(name = "FLivraison.findByCbReplication", query = "SELECT f FROM FLivraison f WHERE f.cbReplication = :cbReplication"),
    @NamedQuery(name = "FLivraison.findByCbFlag", query = "SELECT f FROM FLivraison f WHERE f.cbFlag = :cbFlag")})
public class FLivraison implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "LI_No")
    private int lINo;
    @Lob
    @Column(name = "cbCT_Num")
    private byte[] cbCTNum;
    @Column(name = "LI_Intitule")
    private String lIIntitule;
    @Lob
    @Column(name = "cbLI_Intitule")
    private byte[] cbLIIntitule;
    @Column(name = "LI_Adresse")
    private String lIAdresse;
    @Column(name = "LI_Complement")
    private String lIComplement;
    @Column(name = "LI_CodePostal")
    private String lICodePostal;
    @Column(name = "LI_Ville")
    private String lIVille;
    @Column(name = "LI_CodeRegion")
    private String lICodeRegion;
    @Column(name = "LI_Pays")
    private String lIPays;
    @Column(name = "LI_Contact")
    private String lIContact;
    @Column(name = "N_Expedition")
    private Short nExpedition;
    @Column(name = "N_Condition")
    private Short nCondition;
    @Column(name = "LI_Principal")
    private Short lIPrincipal;
    @Column(name = "LI_Telephone")
    private String lITelephone;
    @Column(name = "LI_Telecopie")
    private String lITelecopie;
    @Column(name = "LI_EMail")
    private String lIEMail;
    @Column(name = "cbProt")
    private Short cbProt;
    @Id
    @Basic(optional = false)
    @Column(name = "cbMarq")
    private Integer cbMarq;
    @Column(name = "cbCreateur")
    private String cbCreateur;
    @Column(name = "cbModification")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cbModification;
    @Column(name = "cbReplication")
    private Integer cbReplication;
    @Column(name = "cbFlag")
    private Short cbFlag;
    @OneToMany(mappedBy = "cbLINo")
    private Collection<FDocentete> fDocenteteCollection;
    @JoinColumn(name = "CT_Num", referencedColumnName = "CT_Num")
    @ManyToOne(optional = false)
    private FComptet cTNum;

    public FLivraison() {
    }

    public FLivraison(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public FLivraison(Integer cbMarq, int lINo) {
        this.cbMarq = cbMarq;
        this.lINo = lINo;
    }

    public int getLINo() {
        return lINo;
    }

    public void setLINo(int lINo) {
        this.lINo = lINo;
    }

    public byte[] getCbCTNum() {
        return cbCTNum;
    }

    public void setCbCTNum(byte[] cbCTNum) {
        this.cbCTNum = cbCTNum;
    }

    public String getLIIntitule() {
        return lIIntitule;
    }

    public void setLIIntitule(String lIIntitule) {
        this.lIIntitule = lIIntitule;
    }

    public byte[] getCbLIIntitule() {
        return cbLIIntitule;
    }

    public void setCbLIIntitule(byte[] cbLIIntitule) {
        this.cbLIIntitule = cbLIIntitule;
    }

    public String getLIAdresse() {
        return lIAdresse;
    }

    public void setLIAdresse(String lIAdresse) {
        this.lIAdresse = lIAdresse;
    }

    public String getLIComplement() {
        return lIComplement;
    }

    public void setLIComplement(String lIComplement) {
        this.lIComplement = lIComplement;
    }

    public String getLICodePostal() {
        return lICodePostal;
    }

    public void setLICodePostal(String lICodePostal) {
        this.lICodePostal = lICodePostal;
    }

    public String getLIVille() {
        return lIVille;
    }

    public void setLIVille(String lIVille) {
        this.lIVille = lIVille;
    }

    public String getLICodeRegion() {
        return lICodeRegion;
    }

    public void setLICodeRegion(String lICodeRegion) {
        this.lICodeRegion = lICodeRegion;
    }

    public String getLIPays() {
        return lIPays;
    }

    public void setLIPays(String lIPays) {
        this.lIPays = lIPays;
    }

    public String getLIContact() {
        return lIContact;
    }

    public void setLIContact(String lIContact) {
        this.lIContact = lIContact;
    }

    public Short getNExpedition() {
        return nExpedition;
    }

    public void setNExpedition(Short nExpedition) {
        this.nExpedition = nExpedition;
    }

    public Short getNCondition() {
        return nCondition;
    }

    public void setNCondition(Short nCondition) {
        this.nCondition = nCondition;
    }

    public Short getLIPrincipal() {
        return lIPrincipal;
    }

    public void setLIPrincipal(Short lIPrincipal) {
        this.lIPrincipal = lIPrincipal;
    }

    public String getLITelephone() {
        return lITelephone;
    }

    public void setLITelephone(String lITelephone) {
        this.lITelephone = lITelephone;
    }

    public String getLITelecopie() {
        return lITelecopie;
    }

    public void setLITelecopie(String lITelecopie) {
        this.lITelecopie = lITelecopie;
    }

    public String getLIEMail() {
        return lIEMail;
    }

    public void setLIEMail(String lIEMail) {
        this.lIEMail = lIEMail;
    }

    public Short getCbProt() {
        return cbProt;
    }

    public void setCbProt(Short cbProt) {
        this.cbProt = cbProt;
    }

    public Integer getCbMarq() {
        return cbMarq;
    }

    public void setCbMarq(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public String getCbCreateur() {
        return cbCreateur;
    }

    public void setCbCreateur(String cbCreateur) {
        this.cbCreateur = cbCreateur;
    }

    public Date getCbModification() {
        return cbModification;
    }

    public void setCbModification(Date cbModification) {
        this.cbModification = cbModification;
    }

    public Integer getCbReplication() {
        return cbReplication;
    }

    public void setCbReplication(Integer cbReplication) {
        this.cbReplication = cbReplication;
    }

    public Short getCbFlag() {
        return cbFlag;
    }

    public void setCbFlag(Short cbFlag) {
        this.cbFlag = cbFlag;
    }

    @XmlTransient
    public Collection<FDocentete> getFDocenteteCollection() {
        return fDocenteteCollection;
    }

    public void setFDocenteteCollection(Collection<FDocentete> fDocenteteCollection) {
        this.fDocenteteCollection = fDocenteteCollection;
    }

    public FComptet getCTNum() {
        return cTNum;
    }

    public void setCTNum(FComptet cTNum) {
        this.cTNum = cTNum;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cbMarq != null ? cbMarq.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FLivraison)) {
            return false;
        }
        FLivraison other = (FLivraison) object;
        if ((this.cbMarq == null && other.cbMarq != null) || (this.cbMarq != null && !this.cbMarq.equals(other.cbMarq))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityprojet.FLivraison[ cbMarq=" + cbMarq + " ]";
    }
    
}
